package com.feng.zshop.backend.dao;

import com.feng.zshop.backend.param.SysuserParam;
import com.feng.zshop.common.exception.DaoException;
import com.feng.zshop.model.Sysuser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysuserDao {

    /**
     * 查询所有的用户
     * @return
     */
    List<Sysuser> listAllSysuser();

    Sysuser getSysuserById(Integer id);

    void deleteSysuserById(Integer id);

    void insert(Sysuser sysuser) throws DaoException;

    void update(Sysuser sysuser) throws DaoException;

    void updateStatusById(@Param("id") Integer id,@Param("valid") int valid);

    List<Sysuser> listByCondition(SysuserParam sysuserParam);

    Sysuser getByLoginNameAndPassword(@Param("loginName") String loginName, @Param("password") String password);
}
